package net.molchat.binroot;


public interface Rootable {

/**
 * Object can serialize itself to Root.
 * 
 * @return Root object, that represents a source object and all subobjects of
 *         it.
 */
public Root toRoot();


/**
 * Object can deserialize itself from Root object, including all known to this
 * object children.
 * 
 * @param root
 *          - represents source object structure.
 * @throws IOException
 */
public void fromRoot(Root root);

}
